clear;

% 加载基因疾病关联矩阵
load('D:\Program Files\DHRLS-master\dataset\gene_disease_Y.mat');
y_train = gene_disease_Y;

% 设置DHRLS模型参数
gamma = 0.5;
beta = 1;
lamda_1 = 1;
lamda_2 = 0.25;
knn = 50;
iter_max = 10;

% 计算核矩阵
K1_list(:,:,2) = getGipKernel(y_train, gamma);  % 疾病矩阵
K2_list(:,:,4) = getGipKernel(y_train', gamma); % 基因矩阵

% 计算核权重
[weight_v1] = cka_kernels_weights(K1_list, y_train, 1);
[weight_v2] = cka_kernels_weights(K2_list, y_train, 2);

% 组合核矩阵
K_COM1 = combine_kernels(weight_v1, K1_list);	
K_COM2 = combine_kernels(weight_v2, K2_list);

% 调用load_gmt.m函数加载通路数据
pathways = load_gmt('c2.cp.v2023.2.Hs.symbols.gmt');

% 调用integratePathwayData.m函数将通路数据集成到训练数据中
enhanced_y_train = integratePathwayData(y_train, pathways);

% 使用增强的训练数据运行DHRLS模型
[A_cos_com] = DHRLS(K_COM1, K_COM2, enhanced_y_train, beta, lamda_1, lamda_2, knn, iter_max);

